package ink.carnation.imtalk.util;

import ink.carnation.imtalk.model.IMResult;
import org.springframework.validation.BindingResult;

public class BindingResultUtil {

    public static IMResult getBindingResultMessage(BindingResult bindingResult) {
        return IMResult.failure(bindingResult.getAllErrors().get(0).getDefaultMessage());
    }
}
